package com.easylive.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: yudaxian
 * @DateTime: 2024/11/9 11:59
 * 0：无更新，1：有更新
 **/
@Getter
@AllArgsConstructor
public enum VideoFileUpdateTypeEnum {
    NO_UPDATE(0, "无更新"),
    UPDATED(1, "有更新")
    ;
    private Integer code;

    private String desc;

    public static VideoFileUpdateTypeEnum getEnumByCode(Integer code) {
        for (VideoFileUpdateTypeEnum e : VideoFileUpdateTypeEnum.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }
}
